]> dgit.raspbian.org Git - grub2.git/commit
fix-for-gcc-2.16-4
authorGRUB Maintainers <pkg-grub-devel@alioth-lists.debian.net>
Wed, 23 Sep 2026 20:39:45 +0000 (21:39 +0100)
committerSteve McIntyre <93sam@debian.org>
Wed, 23 Sep 2026 20:39:45 +0000 (21:39 +0100)
commit8ff305987cdc4942f9ac4dd4c8bf780392f222dd
treef0be110801793e6771f526ecc187174bb3dcfda3
parenta3399cd2828ea8d3526401b26463dd16b190fe46
fix-for-gcc-2.16-4

commit 675d8581037dc8996cf6db21a61d26e28f7d44c1
Author: Nicholas Vinson <nvinson234@gmail.com>
Date:   Tue Feb 24 19:48:39 2026 -0500

    osdep/linux/ofpath: Update strstr() calls

    With C23, strstr() returns a "const char *" if its first argument is
    "const char *", and these changes are implemented in glibc-2.43.

    As a result, the first strstr() call in check_sas() now returns a "const
    char *" instead of "char *" because sysfs_path is a "const char *". This
    triggers a "discards qualifiers" warning, that is later promoted to an
    error and ultimately causes the build to fail.

    To fix the issue, this patch converts "ed", the pointer that stores
    strstr()'s return value, to a "const char *". Removes the xstrdup()
    call and cleans up the rest of the function by updating the *printf()
    calls and using pointer arithmetic to compute lengths instead of strlen().

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name fix-for-gcc-2.16-4.patch
grub-core/osdep/linux/ofpath.c